
/**
 * Copyright 2009 cestum.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
package org.waveprotocol.wave.model.id {
/**
 * This class is used to generate Wave and Wavelet ids.
 */
public interface IdGenerator {
	
	/**
	 * Creates a new unique wave id.
	 *
	 * Conversational waves (all the waves we have today) are specified by a leading
	 * token 'w' followed by a pseudo-random string, e.g. w+3dKS9cD.
	 */
	function newWaveId():WaveId ;
	
	/**
	 * Creates a new unique wavelet id.
	 *
	 * Conversational wavelets are specified by a leading token "conv" followed by a psuedorandom string,
	 * e.g. conv+3sG7. The distinguished root conversation wavelet is
	 * identified by conv+root.
	 */
	function newConversationWaveletId():WaveletId ;
	
	/**
	 * Create a new conversation root wavelet id.
	 *
	 * The conversation root wavelet has id "conv+root".
	 */
	function newConversationRootWaveletId():WaveletId ;
}
}